package com.wen.common.annotation;

import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.wen.common.config.SensitiveJsonSerializer;
import com.wen.common.enums.SensitiveStrategy;

import java.lang.annotation.*;

/**
 * 接口返回数据脱敏注解
 * <p>
 *
 * @author liwen <devinlive@163.com>
 * @version 1.0
 * @since 2023/03/10 14:28
 */
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@JacksonAnnotationsInside
@JsonSerialize(using = SensitiveJsonSerializer.class)
public @interface Sensitive {
    //脱敏策略
    SensitiveStrategy strategy();
}
